<?php
Class Gioithieu extends CI_Controller{
    function __construct()
    {
    parent::__construct();
    $this->load->Model('sanpham_model');
    // $this->load->helper("url");
    }
    public function index(){
        $data['protes']  =$this->sanpham_model->getProductByCate(5);
        $data['protes1'] =$this->sanpham_model->getProductByCate_1(5);
        $data['category']=$this->sanpham_model->category(0);
        foreach($data['category'] as &$item) {
            $item['items'] = $this->sanpham_model->category($item['id']);

        }
        $this->load->view("gioithieu_view",$data);
    }
}
?>